package com.whpost.api.controller.wx;

import com.whpost.api.utils.ApiUtils;
import com.whpost.service.entity.tools.ResultInfo;
import com.whpost.service.wx.service.BaomingServices;
import com.whpost.service.wx.service.WxXcServices;
import com.whpost.service.wx.service.XcServices;
import jakarta.annotation.Resource;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wx/xc")
public class WxXcController {

    @Resource
    private XcServices xcServices;



    //缩略图
    @RequestMapping(value = "/slt",produces = MediaType.IMAGE_JPEG_VALUE)
    @ResponseBody
    public byte[] slt(String id){
        return xcServices.getXcSlt(id);
    }

    //原图
    @RequestMapping(value = "/yt",produces = MediaType.IMAGE_JPEG_VALUE)
    @ResponseBody
    public byte[] yt(String id){
        return xcServices.getXcYt(id);
    }

    @RequestMapping(value ="/query")
    public ResultInfo query(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return xcServices.query(loginId,map);
    }
}
